]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
5 years agoscreenshot: Restrict callers
Florian Müllner [Wed, 16 Jun 2021 20:11:50 +0000 (22:11 +0200)]
screenshot: Restrict callers

The shell D-Bus API was always meant as a private API for core
components, so enforce that by limiting caller to a list of
allowed well-known names.

Applications that want to request a screenshot can use the corresponding
desktop portal.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agoshellDBus: Restrict callers
Florian Müllner [Thu, 17 Jun 2021 13:29:42 +0000 (15:29 +0200)]
shellDBus: Restrict callers

The org.gnome.Shell interface provides a private API to other core
components to implement desktop functionalities like Settings or
global keybindings. It is not meant as a public API, so limit it
to a set of expected callers.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agoshellDBus: Implement all methods asynchronously
Florian Müllner [Thu, 17 Jun 2021 13:29:42 +0000 (15:29 +0200)]
shellDBus: Implement all methods asynchronously

In order to restrict callers, we will need access to the invocation,
not just the unpacked method parameters.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agointrospect: Split out DBusSenderChecker
Florian Müllner [Wed, 16 Jun 2021 17:09:42 +0000 (19:09 +0200)]
introspect: Split out DBusSenderChecker

Restricting callers to a list of allowed senders is useful for
other D-Bus services as well, so split out the existing code
into a reusable class.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agodata: Remove now unused "introspect" setting
Florian Müllner [Wed, 1 Sep 2021 19:25:26 +0000 (21:25 +0200)]
data: Remove now unused "introspect" setting

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agointrospect: Use MetaContext:unsafe-mode instead of setting
Florian Müllner [Wed, 1 Sep 2021 19:18:42 +0000 (21:18 +0200)]
introspect: Use MetaContext:unsafe-mode instead of setting

The property was added precisely for this purpose, except that its
name isn't tied to the introspect API.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agointrospect: Make invocation check error-based
Florian Müllner [Thu, 2 Sep 2021 14:23:38 +0000 (16:23 +0200)]
introspect: Make invocation check error-based

If we throw an error when the invocation isn't allowed instead of
returning false, we can simply return that error instead of duplicating
the error handling.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agoshellDBus: Use MetaContext:unsafe-mode to restrict Eval()
Florian Müllner [Wed, 16 Jun 2021 23:50:50 +0000 (01:50 +0200)]
shellDBus: Use MetaContext:unsafe-mode to restrict Eval()

The Eval() method is unarguably the most sensitive D-Bus method
we expose, since it allows running arbitrary code in the compositor.

It is currently tied to the `development-tools` settings that is
enabled by default. As users have become accustomed to the built-in
commands that are enabled by the same setting (restart, lg, ...),
that default cannot easily be changed.

In order to restrict the method without affecting the rather harmless
commands, guard it by the new MetaContext:unsafe-mode property instead
of the setting.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agopanel: Show warning indicator when unsafe-mode is on
Florian Müllner [Thu, 2 Sep 2021 15:15:36 +0000 (17:15 +0200)]
panel: Show warning indicator when unsafe-mode is on

MetaContext added an unsafe-mode property, which we will use to restrict
a number of privileged operations unless it is enabled. It is meant to
only be enabled temporarily for development/debugging purposes, so add
a scary icon to the top bar as a reminder to turn it off again.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>

5 years agoUpdate Chinese (China) translation
Boyuan Yang [Fri, 3 Sep 2021 18:09:05 +0000 (18:09 +0000)]
Update Chinese (China) translation

5 years agoUpdate Persian translation
Danial Behzadi [Fri, 3 Sep 2021 10:47:09 +0000 (10:47 +0000)]
Update Persian translation

5 years agoboxpointer: Fix positioning with non-widget sources
Florian Müllner [Wed, 1 Sep 2021 18:37:13 +0000 (20:37 +0200)]
boxpointer: Fix positioning with non-widget sources

Commit 16d371873 lifted the requirement for source actors to be
widgets, then got it wrong :rolling_eyes:

The content box is expected to be in actor coordinates, so the
allocation must be translated to (0, 0).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4593

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1969>

5 years agoUpdated Lithuanian translation
Aurimas Černius [Wed, 1 Sep 2021 20:06:41 +0000 (23:06 +0300)]
Updated Lithuanian translation

5 years agowindowManager: Discard workspace scroll smooth events
José Expósito [Mon, 23 Aug 2021 16:30:02 +0000 (18:30 +0200)]
windowManager: Discard workspace scroll smooth events

Since touchpad smooth scroll events with source finger are handled by
the swipeTracker, the workspace scroll handler can focus on discrete
events.

Thanks to Mutter emulating discrete scroll events, see
meta_seat_impl_notify_scroll_continuous_in_impl in meta-seat-impl.c,
it is safe to ignore smooth scroll in the workspace scroll handler
and handle exclusively discrete events.

In addition, once high-resolution scroll events land in Mutter [1], a
mouse will be able generate non emulated smooth scroll events that
should be ignored in favour of the discrete scroll events.
Otherwise, a single mouse wheel click will scroll through multiple
workspaces at once.

[1] https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1962

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1959>

5 years agolayout: Exclude hidden actors from struts
Florian Müllner [Thu, 26 Aug 2021 19:54:15 +0000 (21:54 +0200)]
layout: Exclude hidden actors from struts

Currently we only exclude hidden actors from the input region,
but not from struts. This is an oversight that went unnoticed
until now, probably because we didn't consider the work area
in the overview until recently.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4569

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1963>

5 years agokeyboard: Ensure chrome input region is updated after slide animation
Sebastian Keller [Tue, 17 Aug 2021 22:45:16 +0000 (00:45 +0200)]
keyboard: Ensure chrome input region is updated after slide animation

The keyboard is placed outside of the screen when shown and then slides
in via a transition that changes the translate-y property. This
translation does not affect the allocation of the Keyboard actor and as
such does not trigger any of the signals LayoutManager is connected to
to update the input region. This means the input region remains at the
original position of the actor outside of the screen and as a result on
X11 clicks will go through to the underlying window.

There was a workaround for this by queuing a relayout at the end of the
transition, but this stopped working due to optimizations avoiding
unnecessary allocation changes.

This updates that workaround to toggle the visibility of the actor
instead, which is the other signal that LayoutManager reacts to. Once
ClutterActor provides better ways to react to transforms this can
hopefully be removed entirely.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4556
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1955>

5 years agodash: Fixes wrong separator position
Raghuveer Kasaraneni [Mon, 12 Apr 2021 10:56:28 +0000 (12:56 +0200)]
dash: Fixes wrong separator position

Sometimes when an icon is dragged and dropped in Dash, one Favourite app icon
can appear to the right of Dash separator. This can happen when available system
resources are low and the PlaceHolder destroy animation is delayed and the
corresponding container child is still present. With this commit the separator
position is calculated correctly, even when the animation is pending.

Fixes #3966, #3799

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1804>

5 years agoworkspace: Move fading minimized windows out of allocation
Sebastian Keller [Thu, 19 Aug 2021 18:58:31 +0000 (20:58 +0200)]
workspace: Move fading minimized windows out of allocation

eee2ccac fixed window opacity being changed outside of transitions but
resulted in the final step of the transition, that would set the window
to fully opaque, being missed.

This change now moves the opacity change entirely out of allocation and
instead follows the adjustment changes directly, which still fixes the
original bug and ensures the opacity is also applied for the last step
in the transition.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4561
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1957>

5 years agoinit: Set console log domain
Evan Welsh [Sat, 21 Aug 2021 01:42:27 +0000 (20:42 -0500)]
init: Set console log domain

GJS added a console module that extensions may start using. To ensure that
extensions using console.log() and similar functions don't show up as
'Gjs-Console' in users' system logs, we should call setConsoleLogdomain()
with 'GNOME Shell'.

This GJS API addition is only accessible using ECMAScript Modules (ESM),
this commit moves shell startup to a small init.js module and adapts
CI jobs to either handle or ignore it.

We can drop the .jscheckignore file when future versions of SpiderMonkey
allow for compile checks without validating module specifiers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1958>

5 years agocleanup: Replace non-standard ByteArray module
Florian Müllner [Thu, 12 Aug 2021 14:38:57 +0000 (16:38 +0200)]
cleanup: Replace non-standard ByteArray module

gjs landed support for TextDecoder/TextEncoder. Use those instead
of gjs' own ByteArray module.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1946>

5 years agoworkspace: Update bg border radius in constructor
Ivan Molodetskikh [Mon, 16 Aug 2021 07:00:51 +0000 (10:00 +0300)]
workspace: Update bg border radius in constructor

Otherwise non-zero initial value of stateAdjustment will produce
incorrect radius.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1964>

5 years agobuild: Add soup2 option
Florian Müllner [Sun, 29 Aug 2021 12:24:42 +0000 (14:24 +0200)]
build: Add soup2 option

!1940 added support for soup 3, including a fallback to soup 2.4
where the newer version isn't available.

Unfortunately it missed that libgweather has a hidden soup dependency,
and now gnome-shell fails to start if a weather location has been set
up and soup 3 is available.

We don't have a good way to detect that case, so hide the soup 3 support
behind a build option. Distributors are expected to switch it at the
same time as libgweather.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1966>

5 years agoUpdate Swedish translation
Luna Jernberg [Tue, 31 Aug 2021 20:46:21 +0000 (20:46 +0000)]
Update Swedish translation

5 years agoUpdate French translation
Charles Monzat [Tue, 31 Aug 2021 19:50:29 +0000 (19:50 +0000)]
Update French translation

5 years agomain: Stop handling old 'panel-main-menu' shortcut
Florian Müllner [Thu, 3 Jun 2021 18:12:35 +0000 (20:12 +0200)]
main: Stop handling old 'panel-main-menu' shortcut

It's a shortcut from the GNOME 2 days that few users will remember.
And if anyone really wants to keep it, they can use Settings to
assign <Alt>F1 to 'toggle-overview'.

https://discourse.gnome.org/t/difference-between-show-the-overview-and-show-the-activities-overview-keyboard-shortcuts/6572

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1871>

5 years agoUpdate Slovak translation
Dušan Kazik [Tue, 31 Aug 2021 13:50:41 +0000 (13:50 +0000)]
Update Slovak translation

5 years agoUpdate Slovenian translation
Matej Urbančič [Mon, 30 Aug 2021 19:16:23 +0000 (19:16 +0000)]
Update Slovenian translation

5 years agoUpdate German translation
Philipp Kiemle [Sun, 29 Aug 2021 17:33:10 +0000 (17:33 +0000)]
Update German translation

5 years agoUpdate British English translation
Bruce Cowan [Sat, 28 Aug 2021 10:14:51 +0000 (10:14 +0000)]
Update British English translation

5 years agoUpdate Kazakh translation
Baurzhan Muftakhidinov [Sat, 28 Aug 2021 06:21:55 +0000 (06:21 +0000)]
Update Kazakh translation

5 years agoUpdate Turkish translation
Emin Tufan Çetin [Fri, 27 Aug 2021 21:28:23 +0000 (21:28 +0000)]
Update Turkish translation

5 years agoUpdate Finnish translation
Jiri Grönroos [Fri, 27 Aug 2021 17:50:01 +0000 (17:50 +0000)]
Update Finnish translation

5 years agoUpdate Belarusian translation
Źmicier Turok [Fri, 27 Aug 2021 09:01:12 +0000 (09:01 +0000)]
Update Belarusian translation

5 years agonotificationDaemon: Remove rewriteRules
Ivan Molodetskikh [Thu, 26 Aug 2021 11:42:59 +0000 (11:42 +0000)]
notificationDaemon: Remove rewriteRules

It's not really Shell's business to fix bad app notification contents.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1962>

5 years agonetworkAgent: Fix order of _() and format()
Ivan Molodetskikh [Thu, 26 Aug 2021 07:55:03 +0000 (07:55 +0000)]
networkAgent: Fix order of _() and format()

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1961>

5 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 25 Aug 2021 14:55:42 +0000 (16:55 +0200)]
Updated Spanish translation

5 years agoUpdate Galician translation
Fran Dieguez [Wed, 25 Aug 2021 05:57:36 +0000 (05:57 +0000)]
Update Galician translation

5 years agoenvironment: Fallback to Soup 2.4
Florian Müllner [Wed, 4 Aug 2021 17:37:15 +0000 (19:37 +0200)]
environment: Fallback to Soup 2.4

We cannot assume yet that Soup3 is available everywhere. Until that
is the case, allow falling back to Soup 2.4 by imitating the bits
of the Soup3 API we use with monkey-patching.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoextensionDownloader: Port to Soup3
Florian Müllner [Tue, 3 Aug 2021 23:35:08 +0000 (01:35 +0200)]
extensionDownloader: Port to Soup3

After 13 years, Soup will release a new, API-incompatible
version[0]. This is a good thing, make sure we support it.

[0] https://blog.tingping.se/2021/02/23/future-of-libsoup.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoextensionDownloader: Use plain Soup.Session
Florian Müllner [Tue, 3 Aug 2021 22:28:25 +0000 (00:28 +0200)]
extensionDownloader: Use plain Soup.Session

Unlike for the old Soup.SessionSync/SessionAsync classes,
Soup.Session:ssl-use-system-ca-file already defaults to true.

In Soup3, the behavior was made unconditional and the property
removed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoextensionDownloader: Stop setting proxy resolver explicitly
Florian Müllner [Tue, 3 Aug 2021 22:24:41 +0000 (00:24 +0200)]
extensionDownloader: Stop setting proxy resolver explicitly

Quoting the documentation:

  In libsoup 2.44 and later, you can set the session's “proxy-resolver”
  property to the resolver returned by g_proxy_resolver_get_default() to
  get the same effect. Note that for "plain" SoupSessions (ie, not
  SoupSessionAsync or SoupSessionSync), this is done for you automatically.

libsoup 2.44 was released in 2013, so we can safely assume that Soup is
new enough to handle this for us.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoportalHelper: Replace Soup.URI with GLib.Uri
Florian Müllner [Sat, 7 Aug 2021 01:38:15 +0000 (03:38 +0200)]
portalHelper: Replace Soup.URI with GLib.Uri

GLib.Uri was added a while ago, and can replace our usage of Soup.URI.
In fact, the upcoming Soup3 drops its own URI type in favor of GLib.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoextensionDownloader: Use async code for extracting archive
Florian Müllner [Fri, 6 Aug 2021 22:07:30 +0000 (00:07 +0200)]
extensionDownloader: Use async code for extracting archive

The code that handles extracting extension archives currently uses
an awkward double-callback system. We can do significantly better
by using an async function and exceptions.

Partially based on code from Marco Trevisan.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoextensionDownloader: Stop returning distinct errors
Florian Müllner [Fri, 6 Aug 2021 21:24:24 +0000 (23:24 +0200)]
extensionDownloader: Stop returning distinct errors

Nothing looks at our made-up errors, so we can just as well return
a generic "ExtensionError".

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoextensionDownloader: Fix up style
Florian Müllner [Fri, 6 Aug 2021 22:47:24 +0000 (00:47 +0200)]
extensionDownloader: Fix up style

Move all remaining bits to the new coding style before making
further changes.

The let → const changes are selectively done to the bits that'll
still be around at the end of the patch series.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1940>

5 years agoci: Expose meson's Junit test results to gitlab
Florian Müllner [Thu, 5 Aug 2021 14:47:57 +0000 (16:47 +0200)]
ci: Expose meson's Junit test results to gitlab

Turns out meson has been generated Junit XML files of its test
results since 0.55 ...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1937>

5 years agosubprojects: Use meson compile to generate translations
Florian Müllner [Thu, 5 Aug 2021 13:45:38 +0000 (15:45 +0200)]
subprojects: Use meson compile to generate translations

... for the same cosmetic reasons as the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1937>

5 years agoci: Use backend-agnostic meson commands
Florian Müllner [Thu, 5 Aug 2021 01:46:53 +0000 (03:46 +0200)]
ci: Use backend-agnostic meson commands

There's no alternative backend in sight for us, but it's nice to
only deal with a single build tool.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1937>

5 years agoeslint: (Mostly) synchronize configuration with gjs
Florian Müllner [Thu, 12 Aug 2021 15:12:15 +0000 (17:12 +0200)]
eslint: (Mostly) synchronize configuration with gjs

In addition to the changes in this commit, gjs now
restricts the use of the Format module and initFormat.
We can't really replace those for translatable strings
until xgettext gains support for template strings, so
leave that bit out for now.

The other notable change is that gjs now requires
jsdoc comments. We can't plainly enable those options
without a massive amount of work first, but let's see
how requiring doc comments for new code goes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1949>

5 years agoci: Include eslint-plugin-jsdoc in js image
Florian Müllner [Thu, 12 Aug 2021 21:20:21 +0000 (23:20 +0200)]
ci: Include eslint-plugin-jsdoc in js image

gjs started to require it in its config, so we need it
if we want to keep our configuration in sync.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1949>

5 years agoUpdated Czech translation
Marek Černocký [Mon, 23 Aug 2021 22:14:12 +0000 (00:14 +0200)]
Updated Czech translation

5 years agoextensions-tool: Remove GNOME Software reference from man page
Florian Müllner [Wed, 18 Aug 2021 15:20:49 +0000 (17:20 +0200)]
extensions-tool: Remove GNOME Software reference from man page

It no longer manages extensions.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1956>

5 years agomessageTray: Do not show low priority notifications
Florian Müllner [Fri, 18 Jun 2021 21:15:05 +0000 (23:15 +0200)]
messageTray: Do not show low priority notifications

Low priority notifications are meant for information that doesn't require
immediate attention, so it makes sense to not show a banner for them;
they'll still appear in the notification list in the calendar.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4265

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1893>

5 years agoUpdate Indonesian translation
Kukuh Syafaat [Sun, 22 Aug 2021 04:45:37 +0000 (04:45 +0000)]
Update Indonesian translation

5 years agoUpdate Persian translation
Danial Behzadi [Sat, 21 Aug 2021 11:26:51 +0000 (11:26 +0000)]
Update Persian translation

5 years agoUpdate Basque translation
Asier Sarasua Garmendia [Fri, 20 Aug 2021 08:19:41 +0000 (08:19 +0000)]
Update Basque translation

5 years agoUpdate Russian translation
Alexey Rubtsov [Fri, 20 Aug 2021 07:12:23 +0000 (07:12 +0000)]
Update Russian translation

5 years agowindowManager: Animate the appearance of new windows after overview closes
Daniel van Vugt [Thu, 17 Sep 2020 07:25:49 +0000 (15:25 +0800)]
windowManager: Animate the appearance of new windows after overview closes

So that the animation doesn't get skipped if the overview is visible but
in the process of closing.

In this case the overview being visible also means that it is closing,
because if it's visible and not already closing then `_shouldAnimateActor`
would have returned false and exited `_mapWindow` earlier.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1814,
       https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3242

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>

5 years agooverview: Emit 'hidden' after it's *really* hidden
Daniel van Vugt [Thu, 17 Sep 2020 07:24:12 +0000 (15:24 +0800)]
overview: Emit 'hidden' after it's *really* hidden

Previously we would emit 'hidden' before the overview was fully hidden,
so any attempts to animate windows on that signal could still fail.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>

5 years agowindowManager: Allow animations to start if the overview is closing
Daniel van Vugt [Wed, 16 Sep 2020 07:03:47 +0000 (15:03 +0800)]
windowManager: Allow animations to start if the overview is closing

So the `WindowManager._mapWindow` animation doesn't get skipped if the
overview is visible but closing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>

5 years agoworkspace: Ignore new windows that appear while the overview is closing
Daniel van Vugt [Wed, 16 Sep 2020 06:56:13 +0000 (14:56 +0800)]
workspace: Ignore new windows that appear while the overview is closing

This can easily happen if an app launches and maps a window faster than
the overview closes. We don't want the window clone appearing and then
suddenly disappearing in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>

5 years agooverview: Add a 'closing' getter
Daniel van Vugt [Wed, 16 Sep 2020 06:52:19 +0000 (14:52 +0800)]
overview: Add a 'closing' getter

Which better communicates what we are checking for, and is a little more
elegant than repeatedly writing:
```
Main.overview.animationInProgress && Main.overview.visibleTarget == false
```

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>

5 years agoUpdate Catalan translation
Jordi Mas [Wed, 18 Aug 2021 17:13:18 +0000 (19:13 +0200)]
Update Catalan translation

5 years agomagnifier: Avoid painting a desktop that's fully occluded by its clone
Daniel van Vugt [Fri, 25 Jun 2021 09:09:06 +0000 (17:09 +0800)]
magnifier: Avoid painting a desktop that's fully occluded by its clone

This significantly reduces the render time for fullscreen zoom mode.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3305
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1899>

5 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Wed, 18 Aug 2021 13:27:36 +0000 (13:27 +0000)]
Update Brazilian Portuguese translation

5 years agoUpdate Portuguese translation
Hugo Carvalho [Wed, 18 Aug 2021 11:11:55 +0000 (11:11 +0000)]
Update Portuguese translation

5 years agoUpdate Basque translation
Asier Sarasua Garmendia [Wed, 18 Aug 2021 09:24:11 +0000 (09:24 +0000)]
Update Basque translation

5 years agoUpdate Occitan translation
Quentin PAGÈS [Wed, 18 Aug 2021 09:12:34 +0000 (09:12 +0000)]
Update Occitan translation

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Wed, 18 Aug 2021 06:35:57 +0000 (06:35 +0000)]
Update Ukrainian translation

5 years agoBump versiont to 41.beta
Florian Müllner [Tue, 17 Aug 2021 22:35:16 +0000 (00:35 +0200)]
Bump versiont to 41.beta

Update NEWS.

5 years agowindowMenu: Use consistent terminology
nitinosiris [Thu, 6 May 2021 15:38:23 +0000 (21:08 +0530)]
windowMenu: Use consistent terminology

Because we don't have a dock or panel to minimize to, the `minimize`
shortcut was renamed to `hide` a long time ago.

Likewise, `unmaximize` appears as `restore` in keyboard shortcuts.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4088

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1834>

5 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 17 Aug 2021 11:49:29 +0000 (13:49 +0200)]
Updated Spanish translation

5 years agoappDisplay: Replace AppIconMenu
Florian Müllner [Thu, 12 Aug 2021 00:02:12 +0000 (02:02 +0200)]
appDisplay: Replace AppIconMenu

We are finally ready to share the app menu between the top bar and
context menus in the dash/app grid. Notably that means that it is
now possible to quit an app from its context menu.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2875

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Support launching on the non-default GPU
Florian Müllner [Wed, 11 Aug 2021 23:31:35 +0000 (01:31 +0200)]
appMenu: Support launching on the non-default GPU

Changing the GPU to launch an app on is the last feature from the
app context menu that is still missing. Add support for it now,
and we are ready for some unifying cleanup!

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Remove separator between "new window" and actions
Florian Müllner [Wed, 11 Aug 2021 22:33:33 +0000 (00:33 +0200)]
appMenu: Remove separator between "new window" and actions

We hide our own "New Window" item if the app itself includes a
"new-window" action. That means that the separator between the
built-in item and desktop actions introduces a small inconsistency
depending on whether a "New Window" item is provided by the desktop
action or ourselves. There's no good reason for that from a user's
perspective, so remove the separator.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Optionally include favorites section
Florian Müllner [Wed, 11 Aug 2021 21:50:50 +0000 (23:50 +0200)]
appMenu: Optionally include favorites section

The context menu in the overview includes actions for managing
favorites. Add those to the AppMenu class, but make it another
option as the actions would be slightly weird in the top bar menu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Update "new-window" item on state changes
Florian Müllner [Thu, 12 Aug 2021 01:49:37 +0000 (03:49 +0200)]
appMenu: Update "new-window" item on state changes

Stopped apps can *always* open a new window, so before we start
using the menu for non-running apps, make sure to hide the menu
item as necessary.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Only show 'Quit' for running apps
Florian Müllner [Thu, 12 Aug 2021 00:47:23 +0000 (02:47 +0200)]
appMenu: Only show 'Quit' for running apps

The top bar menu always corresponds to a running app, so it made
sense to include the 'Quit' item unconditionally. That won't be
the case for the overview context menus, so handle app state changes
and show/hide the item as necessary.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Allow showing the window section for all windows
Florian Müllner [Thu, 12 Aug 2021 19:25:49 +0000 (21:25 +0200)]
appMenu: Allow showing the window section for all windows

Since commit fd0da9606fd2, we only show the "Open Windows" section
if there are at least two windows. That's another subtle difference
with the overview context menus, but while limiting the section to
a minimum of two windows makes sense where the menu always represents
a running app, it is useful to show the section even for single windows
in the dash/app grid.

Account for both uses cases by adding a corresponding option to the
constructor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Only include non-skip-taskbar windows
Florian Müllner [Thu, 12 Aug 2021 00:34:12 +0000 (02:34 +0200)]
appMenu: Only include non-skip-taskbar windows

There's a subtle difference between the top bar menu and the app
icon context menus in the overview regarding the "Open Window"
section.

The former includes skip-taskbar windows, the latter doesn't. It
clearly doesn't make sense for the context menu to include windows
that aren't shown in the overview, but skip-taskbar windows are
likely also less useful in the top bar menu.

Just settle on the behavior of the context menus and move on.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Do launch animation if supported by source
Florian Müllner [Wed, 11 Aug 2021 21:54:30 +0000 (23:54 +0200)]
appMenu: Do launch animation if supported by source

Likewise any launch actions should animate the corresponding launcher
(if the menu is associated with a launcher).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Hide overview when activating apps
Florian Müllner [Wed, 11 Aug 2021 20:54:11 +0000 (22:54 +0200)]
appMenu: Hide overview when activating apps

This is the expected behavior when activating a window or app. Until
now we could rely on the menu being hidden in the overview, but as
that is about to change, make sure the menu behaves as expected.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappsMenu: Add side parameter
Florian Müllner [Wed, 11 Aug 2021 20:53:54 +0000 (22:53 +0200)]
appsMenu: Add side parameter

In order to re-use the menu in the overview, we must be able to
change the side of the arrow, so expose the parent class parameter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Delay window sections update when selecting window
Florian Müllner [Thu, 12 Aug 2021 00:16:59 +0000 (02:16 +0200)]
appMenu: Delay window sections update when selecting window

App windows are ordered by recency, so a focus change (correctly)
triggers the ::window-changed signal. If we rebuild the section
immediately in response, the activating item will be destroyed
before the menu's ::activate handler, with the result that the
menu remains open.

Defer the section update in that case to allow the menu to process
the ::activate signal first.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Clean up on destroy
Florian Müllner [Wed, 11 Aug 2021 22:24:02 +0000 (00:24 +0200)]
appMenu: Clean up on destroy

For now the menu is only used in the top bar, where we can assume
that it exists "forever". This won't be the case when we start
reusing it elsewhere, so make sure we clean up after ourselves.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappMenu: Split out from panel
Florian Müllner [Wed, 11 Aug 2021 17:40:52 +0000 (19:40 +0200)]
appMenu: Split out from panel

There is a big overlap between the app menu in the top bar and the
context menu of app icons. It makes sense to unify the two both
from a design- and from a code perspective, so split out the more
modern one into a separate module as basis for a shared class.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoappDisplay: Remove unnecessary unmapped handler
Florian Müllner [Wed, 11 Aug 2021 22:07:17 +0000 (00:07 +0200)]
appDisplay: Remove unnecessary unmapped handler

Since commit 35494f5d08, all menus are closed when their source
gets unmapped.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>

5 years agoUpdate Hebrew translation
Yaron Shahrabani [Mon, 16 Aug 2021 20:19:31 +0000 (20:19 +0000)]
Update Hebrew translation

5 years agoUpdate Romanian translation
Daniel Șerbănescu [Mon, 16 Aug 2021 17:42:24 +0000 (17:42 +0000)]
Update Romanian translation

5 years agoUpdate Persian translation
Danial Behzadi [Mon, 16 Aug 2021 12:45:26 +0000 (12:45 +0000)]
Update Persian translation

5 years agoscreenShield: Asyncify _syncInhibitor()
Sebastian Keller [Sun, 15 Aug 2021 00:18:12 +0000 (02:18 +0200)]
screenShield: Asyncify _syncInhibitor()

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4553
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1952>

5 years agoscreenShield: Close inhibitors that finished creation after uninhibition
Sebastian Keller [Thu, 5 Aug 2021 05:22:07 +0000 (07:22 +0200)]
screenShield: Close inhibitors that finished creation after uninhibition

There was a potential issue when suspend was inhibited and immediately
uninhibited again before the creation of the inhibitor has finished.
Then the new inhibitor would be kept active.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1927>

5 years agoscreenShield: Don't unnecessarily close or recreate inhibitors
Sebastian Keller [Fri, 23 Jul 2021 15:35:00 +0000 (17:35 +0200)]
screenShield: Don't unnecessarily close or recreate inhibitors

ScreenShield::_syncInhibitor() was closing (and recreating) the
inhibitor everytime it was called, even if no change was needed.
This gets called in various places, including on property changes in
the login1 dbus object. These happen by the time logind already started
suspending at which point new inhibitors can no longer be created. It is
only waiting for existing inhibitors to be closed, so closing the
inhibitor without a new inhibitor will cause the suspending to proceed
immediately if no other inhibitors are present. This can also happen
before the lock screen is shown, which will then complete after resume.

Fix this by keeping track of the expected inhibition state and only
create or close inhibitors if there was a change to that.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3736

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1927>

5 years agoUpdate Swedish translation
Luna Jernberg [Sun, 15 Aug 2021 15:48:27 +0000 (15:48 +0000)]
Update Swedish translation

5 years agoUpdate Indonesian translation
Kukuh Syafaat [Sun, 15 Aug 2021 11:58:14 +0000 (11:58 +0000)]
Update Indonesian translation

5 years agoextensionUtils: Add gettext convenience helpers
Florian Müllner [Sun, 12 Apr 2020 00:45:55 +0000 (02:45 +0200)]
extensionUtils: Add gettext convenience helpers

We have initTranslations() for binding an extension's
gettext domain, but nothing to help with using gettext
from an extension.

Such help would be useful though, as an extension that
calls textdomain() like a normal application would
inadvertently changes the default domain for the whole
gnome-shell process.

Instead, extensions have to use domain-specific versions
of the gettext functions:

```js
const Gettext = imports.gettext.domain('my-extension');
const _ = Gettext.gettext;
```

Make this a bit easier by adding those functions directly
to the extensions object when initTranslations() is called,
then expose helper functions for calling them.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2594

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>

5 years agoci: Split POTFILES check between C and JS
Florian Müllner [Mon, 9 Aug 2021 02:00:43 +0000 (04:00 +0200)]
ci: Split POTFILES check between C and JS

Regex are a crude tool for analyzing whether some code *calls* a
particular function. Spidermonkey has Reflect.parse() that returns
the AST of the passed in code, which allows for a much more precise
check for javascript.

The old script is still used for C code, where i18n-affecting changes
are much rarer.

Based heavily on Philip Chimento's mozjs migration script at
https://gitlab.gnome.org/ptomato/moz60tool.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1941>

5 years agoUpdate Russian translation
Alexey Rubtsov [Sat, 14 Aug 2021 11:56:36 +0000 (11:56 +0000)]
Update Russian translation

5 years agostatus/network: Use wwan settings panel for GSM/LTE Modems
Mohammed Sadiq [Tue, 10 Aug 2021 09:52:30 +0000 (15:22 +0530)]
status/network: Use wwan settings panel for GSM/LTE Modems

GSM/UMTS/LTE modems now have better support with wwan panel in GNOME
Settings.  So, if the modem supports, open wwan panel, otherwise
fallback to opening network panel when "Mobile Broadband Settings"
item is clicked.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/583

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1942>

5 years agoiconGrid: Bail out when not on a monitor
Florian Müllner [Fri, 13 Aug 2021 01:21:47 +0000 (03:21 +0200)]
iconGrid: Bail out when not on a monitor

There shouldn't be any code that calls zoomOutActor() without
a monitor, but throwing in an early return doesn't hurt.

CID 351285.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>